home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / ae / code / ax3.00 / express.h < prev    next >
Encoding:
C/C++ Source or Header  |  1980-01-03  |  13.0 KB  |  502 lines

  1. #include <pragmas/asl_pragmas.h>
  2. #include <pragmas/cia_pragmas.h>
  3. #include <pragmas/console_pragmas.h>
  4. #include <pragmas/diskfont_pragmas.h>
  5. #include <pragmas/dos_pragmas.h>
  6. #include <pragmas/exec_pragmas.h>
  7. #include <pragmas/gadtools_pragmas.h>
  8. #include <pragmas/graphics_pragmas.h>
  9. #include <pragmas/icon_pragmas.h>
  10. #include <pragmas/input_pragmas.h>
  11. #include <pragmas/intuition_pragmas.h>
  12. #include <pragmas/rexxsyslib_pragmas.h>
  13. #include <pragmas/timer_pragmas.h>
  14. #include <pragmas/utility_pragmas.h>
  15. #include <pragmas/wb_pragmas.h>
  16.  
  17. #define SUCCESS 0
  18. #define PRIVATE 10
  19. #define LCFILES 9
  20. #define FAILURE -1
  21. #define NOTALLOWED 1
  22. #define NOTTESTED  2
  23. #define ABORT    -2 
  24. #define HISTORY 999
  25. #define MAXHIST 20
  26.  
  27. #define NOSCREENS 0
  28. #define BBSSCREENS 1
  29. #define NODESCREENS 2
  30.  
  31. #define KEYBOARD_TIMEOUT 300L
  32.  
  33. #ifndef FOREVER
  34. #    define FOREVER for(;;)
  35. #endif
  36.  
  37. #define FALSE 0
  38. #define TRUE  1
  39.  
  40. #define AWAIT_LOGON    0
  41. #define SYSOP_LOGON    1
  42. #define LOCAL_LOGON    2
  43. #define REMOTE_LOGON    3
  44. #define GOODBYE_LOGON    4
  45. #define SUSPEND_LOGON    5
  46.  
  47. #define STANDARD_LOGOFF    1
  48. #define SLEEP_LOGOFF    2
  49. #define OVERTIME_LOGOFF    3
  50. #define CARRIER_LOGOFF    4
  51. #define ILLEGAL_LOGOFF    5
  52.  
  53. #define ENV_IDLE        0
  54. #define ENV_DOWNLOADING 1
  55. #define ENV_UPLOADING   2
  56. #define ENV_DOORS       3
  57. #define ENV_MAIL        4
  58. #define ENV_STATS       5
  59. #define ENV_ACCOUNT     6
  60. #define ENV_ZOOM        7
  61. #define ENV_FILES       8
  62. #define ENV_BULLETINS   9
  63. #define ENV_VIEWING     10
  64. #define ENV_ACCOUNTSEQ  11
  65. #define ENV_LOGOFF      12
  66. #define ENV_SYSOP       13
  67. #define ENV_SHELL       14
  68. #define ENV_EMACS       15
  69. #define ENV_JOIN        16
  70. #define ENV_CHAT        17
  71. #define ENV_NOTACTIVE   18
  72. #define ENV_REQ_CHAT    19
  73. #define ENV_CONNECT     20
  74. #define ENV_LOGGINGON   21
  75. #define ENV_AWAITCONNECT 22
  76. #define ENV_SCANNING     23
  77. #define ENV_SHUTDOWN     24
  78. #define ENV_MULTICHAT    25
  79. #define ENV_SUSPEND      26
  80. #define ENV_RESERVE      27
  81.  
  82. #define SV_SYSOPLOG       154
  83. #define SV_LOCALLOG       155
  84. #define SV_ACCOUNTS       156
  85. #define SV_CHAT           157
  86. #define SV_NODEOFFHOOK    158
  87. #define SV_EXITNODE       159
  88. #define SV_INITMODEM      160
  89. #define SV_WHATSUP        161
  90. #define RESERVED_BLOCK10  162
  91. #define SV_INSTANT        170
  92. #define SV_RESERVE        171
  93. #define SV_CHATTOGGLE     172
  94. #define SV_AESHELL        174
  95. #define SV_CLIPBOARD      175
  96. #define SV_START          176
  97. #define SV_NEWMSG         177
  98. #define SV_QUIETNODE      178
  99. #define SV_SETNRAMS       179
  100. #define SV_RESERVENODE    180
  101.  
  102. #define WAIT     600
  103. #define NOWAIT   FALSE
  104. #define YES      TRUE
  105. #define NO       FALSE
  106. #define ECHO     TRUE
  107. #define NOECHO   FALSE
  108. #define CSI      0x9B
  109. #define RIGHTARROW 2
  110. #define LEFTARROW 3
  111. #define UPARROW 4
  112. #define DOWNARROW 5
  113.  
  114. #define IOFLAG_FIL_IN    0
  115. #define IOFLAG_KBD_IN    1
  116. #define IOFLAG_SER_IN    2
  117. #define IOFLAG_FIL_OUT    3
  118. #define IOFLAG_PRT_OUT    4
  119. #define IOFLAG_SCR_OUT    5
  120. #define IOFLAG_SER_OUT    6
  121.  
  122. #define TIMEOUT  -3
  123. #define NO_CARRIER -4
  124. #define GOODBYE  -7
  125. #define EXITCHAT  -8
  126.  
  127. #define STAT_STARTUP    0
  128. #define STAT_LOGON    1
  129. #define STAT_LOGOFF    2
  130. #define STAT_GUEST_CALL    3
  131. #define STAT_NEW_CALL    4
  132. #define STAT_VALID_CALL    5
  133. #define STAT_MESSAGE    6
  134. #define STAT_LETTER    7
  135. #define STAT_UPLOAD    8
  136. #define STAT_DOWNLOAD    9
  137. #define STAT_NEW_MEMBER    10
  138. #define STAT_SHUTDOWN    11
  139.  
  140. #define MAX_CONFS 9                  /* Number of conferences */
  141.  
  142. struct Commands {
  143.  UBYTE   AcLvl[100], SerDevUnit;
  144.  char    SerDev[40], NEW_UserPW[15];
  145.  long    OpeningBaud;
  146.  BYTE    TaskPri;
  147.  char    ConfName[MAX_CONFS][60], ConfLoc[MAX_CONFS][60], BBSName[41], BBSLoc[41], SysopName[41];
  148.  UBYTE   PSAcLvl[6], PSRType[6], PSRatio[6];
  149.  long    PSDBytes[6], PSTime[6];
  150.  char    PSCnfAc[6][10], MInit[101], MReset[31], MRing[31], MAnswer[31], MC300[31],
  151.          MC1200[31], MC2400[31], MC4800[31], MC9600[31], MC19200[31];
  152.  short   NumConf;
  153.  char    SysPass[31], RemotePass[31];
  154.  USHORT  BaudTimes[10];
  155.  char    Pad[18];
  156. };
  157.  
  158.  
  159. struct ZModem {
  160.  char    FileName[40], TitleBar[60], ZStat[60];
  161.  long    Filesize, Cps,  Eff, RecPos, ErrorPos, ResumePos;
  162.  ULONG   ApxTime, LastTime;
  163.  char    Pad[2];
  164. };
  165.  
  166. struct TempSysopInfo {
  167.     UWORD        AccessLevel;
  168.     UWORD        RatioType;
  169.     UWORD        Ratio;
  170.     LONG        TimeTotal;
  171.     UBYTE        ConfAc[10];
  172.     };
  173.  
  174.  /* Note ConfYM = the last msg you actually read, ConfRead is the same ?? */
  175.  
  176. struct User
  177. {
  178.     char    Name[31];
  179.     char    Pass[9];
  180.     char    Location[30];
  181.     char    PhoneNumber[13];
  182.     USHORT    Slot_Number;
  183.     USHORT    Sec_Status;
  184.     USHORT    Sec_Board;        /* File or Byte Ratio */
  185.     USHORT    Sec_Library;        /* Ratio              */
  186.     USHORT    Sec_Bulletin;        /* Computer Type      */
  187.     USHORT    Messages_Posted;
  188.     ULONG   NewSinceDate;
  189.     char    PassKey[4];
  190.     ULONG   ConfRead2, ConfRead3, ConfRead4, ConfRead5;
  191.     UWORD   XferProtocol;
  192.     UWORD   Filler2;
  193.     UWORD   Lcfiles;
  194.     UWORD    BadFiles; 
  195.     ULONG   AccountDate;
  196.     UWORD   ScreenType;
  197.     UWORD    EditorType;
  198.     char    Conference_Access[10];
  199.     USHORT  Uploads;
  200.     USHORT    Downloads;
  201.     USHORT    ConfRJoin;
  202.     USHORT    Times_Called;
  203.     long    Time_Last_On;
  204.     long    Time_Used;
  205.     long    Time_Limit;
  206.     long    Time_Total;
  207.     ULONG   Bytes_Download;
  208.     ULONG    Bytes_Upload;
  209.     ULONG    Daily_Bytes_Limit;
  210.     ULONG    Daily_Bytes_Dld;
  211.     char    Expert;
  212.     ULONG   ConfYM1;
  213.     ULONG    ConfYM2;
  214.     ULONG    ConfYM3;
  215.     ULONG    ConfYM4;
  216.     ULONG    ConfYM5;
  217.     ULONG    ConfYM6;
  218.     ULONG    ConfYM7;
  219.     ULONG    ConfYM8;
  220.     ULONG    ConfYM9;
  221.     long    BeginLogCall;
  222.     UBYTE   Protocol;
  223.     UBYTE    UUCPA;
  224.     UBYTE    LineLength;
  225.     UBYTE    New_User;
  226. };
  227.  
  228.  
  229. struct RTSUser {
  230.  char pad1[8];
  231.  char    Name[31],Pass[9],Location[30],PhoneNumber[13];
  232.  USHORT  Slot_Number;              /* max 255 should be UBYTE */
  233.  USHORT  Sec_Status,
  234.      Sec_Board,                   /* File or Byte Ratio */
  235.      Sec_Library,                 /* Ratio              */
  236.      Sec_Bulletin,                /* Computer Type      */
  237.      Messages_Posted;
  238.  /* Note ConfYM = the last msg you actually read, ConfRead is the same ?? */
  239.  ULONG   NewSinceDate;
  240.  ULONG   ConfRead[9];
  241.  char    Conference_Access[10];
  242.  USHORT  Uploads, Downloads, ConfRJoin, Times_Called;
  243.  long    Time_Last_On, Time_Used, Time_Limit, Time_Total;
  244.  ULONG   Bytes_Download, Bytes_Upload, Daily_Bytes_Limit, Daily_Bytes_Dld;
  245.  char    Expert;
  246.  ULONG   ConfYM[9];
  247.  long    BeginLogCall;
  248.  UBYTE   Protocol, UUCPA, LineLength, New_User;
  249.  char pad2[16];
  250.  };
  251.  
  252. struct OLDUserKeys {                 /* changes to UserKeys (RTS) */
  253.  char    UserName[31];
  254.  long    Number;
  255.  UBYTE   New_User;
  256.  UWORD   UPcps;              /* highest upload cps rate */
  257.  UWORD   DNcps;              /* highest dnload cps rate */
  258.  UWORD   Userflags;          /*                         */
  259.  char    Pad[11];            /* ?? should be 15         */
  260. };
  261.  
  262. struct UserKeys {                 /* changes to UserKeys (RTS) */
  263.  char    UserName[31];
  264.  long    Number;
  265.  UBYTE   New_User;
  266.  UWORD   UPcps;              /* highest upload cps rate */
  267.  UWORD   DNcps;              /* highest dnload cps rate */
  268.  UWORD   Userflags;          /*                         */
  269.  UWORD   baud_rate;          /* last online baud rate   */
  270.  char    Pad[9];             /* ?? should be 15         */
  271. };
  272.  
  273. struct OldMailHeader {
  274.     char    Status[1];
  275.     long    MsgNumb;
  276.     char    ToName[31],
  277.         FromName[31],
  278.         Subject[31];
  279.     long    MsgDate,
  280.         Recv;
  281.     char Pad;
  282.     };
  283. struct MailHeader {
  284.     char    Status[1];
  285.     long    MsgNumb;
  286.      long ActualMsgNumb;
  287.     char    ToName[31],
  288.         FromName[31],
  289.         Subject[31];
  290.      char ToNet[8],FromNet[8];
  291.     long    MsgDate,
  292.         Recv;
  293.      long threaded;
  294.     char Pad;
  295.     };
  296.  
  297. struct MailStat {
  298.     long    LowestKey,
  299.         HighMsgNum,
  300.         LowestNotDel;
  301.     char Pad[6];
  302.     };
  303. struct ConfBase
  304. {
  305.   char Handle[31];
  306.   ULONG NewSinceDate, ConfRead,ConfYM;
  307.   ULONG Bytes_Download,Bytes_Upload;
  308.   ULONG Daily_Bytes_Limit,Daily_Bytes_Dld;
  309.   USHORT Upload,Downloads,RatioType,Ratio,Messages_Posted;
  310.   UWORD Access;
  311.   UWORD Active;
  312. };
  313.  
  314. struct MyData
  315. {
  316.   int Type,Size,misc1,Version;
  317. };
  318.  
  319. struct MasterData
  320. {
  321.    struct MyData   Code;
  322.    struct ConfBase Conf;
  323. };
  324. /* stupid defines , theres gotta be a better way , will have to 
  325.    consult the Lattice Manual */
  326.  
  327. #define AbortIO(x) AbortIO((struct IORequest *)x)
  328. #define CheckIO(x) CheckIO((struct IORequest *)x)
  329. #define WaitIO(x) WaitIO((struct IORequest *)x)
  330. #define SendIO(x) SendIO((struct IORequest *)x)
  331. #define DoIO(x) DoIO((struct IORequest *)x)
  332. #define BeginIO(x) BeginIO((struct IORequest *)x)
  333.  
  334. #define OpenDevice(a, b, c, d) OpenDevice(a, b, (struct IORequest *)c, d)
  335. #define CloseDevice(x) CloseDevice((struct IORequest *)x)
  336.  
  337. #define DeleteExtIO(x) DeleteExtIO((struct IORequest *)x)
  338.  
  339. #define Tell(x)  Seek(x,0L,OFFSET_CURRENT)
  340.  
  341. #undef PutStr
  342.  
  343. struct StartOption
  344. {
  345.   SHORT LeftEdge;
  346.   SHORT TopEdge;
  347.   SHORT Width;
  348.   SHORT Height;
  349.   int BitPlanes;
  350.   BOOL StatBar;
  351.   BOOL Interlace;
  352.   BOOL DupeCheck;
  353.   BOOL QLogon;
  354.   BOOL TakeCredits;
  355.   BOOL SeenIt;
  356.   BOOL TrapDoor;
  357.   BOOL Iconify;
  358.   BOOL Eall_level;
  359.   BOOL A2232;
  360.   BOOL Toggles[20];
  361.   char Logoff[80];
  362.   char ShutDown[80];
  363.   char CycleLock[80];
  364.   char RamPen[80];
  365.   char BBSConfig[80];
  366.   char FilesNot[80];
  367.   char UserData[80];
  368.   char UserKey[80];
  369.   char OffHook[80];
  370.   char NodeScreen[80];
  371.   APTR t;
  372.   APTR s;
  373. };
  374. #define ACS_ACCOUNT_EDITING      0
  375. #define ACS_BULLETINS            1
  376. #define ACS_COMMENT_TO_SYSOP     2
  377. #define ACS_DOWNLOAD             3
  378. #define ACS_UPLOAD               4
  379. #define ACS_ENTER_MESSAGE        5
  380. #define ACS_FILE_LISTINGS        6
  381. #define ACS_JOIN_CONFERENCE      7
  382. #define ACS_NEW_FILES_SINCE      8
  383. #define ACS_PAGE_SYSOP           9
  384. #define ACS_READ_MSG             10
  385. #define ACS_REMOTE_SHELL         11
  386. #define ACS_DISPLAY_USER_STATS   12
  387. #define ACS_VIEW_A_FILE          13
  388. #define ACS_EDIT_USER_INFO       14
  389. #define ACS_EDIT_USER_NAME       15
  390. #define ACS_EDIT_USER_LOCATION   16
  391. #define ACS_EDIT_PHONE_NUMBER    17
  392. #define ACS_EDIT_PASSWORD        18
  393. #define ACS_ZIPPY_TEXT_SEARCH    19
  394. #define ACS_OVERRIDE_CHAT        20
  395. #define ACS_SYSOP_DOWNLOAD       21
  396. #define ACS_SYSOP_VIEW           22
  397. #define ACS_SYSOP_READ           23
  398. #define ACS_KEEP_UPLOAD_CREDIT   24
  399. #define ACS_OVERRIDE_TIMES       25
  400. #define ACS_CLEAR_SCREEN_MSG     26
  401. #define ACS_ALLOW_FREE_RESUMING  27
  402. #define ACS_ONE_TIME_BULLETINS   28
  403. #define ACS_DO_CALLERSLOG        29
  404. #define ACS_SENTBY_FILES         30
  405. #define ACS_DO_UD_LOG            31
  406. #define ACS_SCREEN_TO_FRONT      32
  407. #define ACS_DEFAULT_CHAT_ON      33
  408. #define ACS_EALL_LEVEL           34
  409. #define ACS_DUPE_FILECHECK       35
  410. #define ACS_MSG_EDIT             36
  411. #define ACS_NODE_LIST            37
  412. #define ACS_MSG_LEVEL            38
  413. #define ACS_MSG_EXPERATION       39
  414. #define ACS_DELETE_MSG           40
  415. #define ACS_ATTACH_FILES         41
  416. #define ACS_CUSTOMCOMMANDS       42
  417. #define ACS_JOIN_SUB_CONFERENCE  43
  418. #define ACS_ZOOM_MAIL            44
  419. #define ACS_MCI_MSG              45
  420. #define ACS_EDIT_DIRS            46
  421. #define ACS_EDIT_ANY             47
  422. #define ACS_BREAK_CHAT           48
  423. #define ACS_QUIET_NODE           49
  424. #define ACS_SYSOP_COMMANDS       50
  425. #define ACS_WHO_IS_ONLINE        51
  426. #define ACS_RELOGON              52
  427. #define ACS_ULSTATS              53
  428. #define ACS_XPR_RECEIVE          54
  429. #define ACS_XPR_SEND             55
  430. #define ACS_WILDCARDS            56
  431. #define ACS_CONFERENCE_ACCOUNTING 57
  432. #define ACS_PRI_MSGFILES         58
  433. #define ACS_PUB_MSGFILES         59
  434. #define ACS_FULLEDIT             60
  435.  
  436. //#define ADD_BIT(x) newacs[x/16] |= ten[x%16]
  437. //#define REM_BIT(x) newacs[x/16] ^= ten[x%16]
  438. //#define GET_BIT(x) newacs[x/16] |  ten[x%16]
  439.  
  440. #define LVL_ACCOUNT_EDITING      0
  441. #define LVL_COMMENT_TO_SYSOP     1
  442. #define LVL_DOWNLOAD             2
  443. #define LVL_ENTER_MESSAGE        3
  444. #define LVL_FILE_LISTINGS        4
  445. #define LVL_JOIN_CONFERENCE      5
  446. #define LVL_NEW_FILES_SINCE      6
  447. #define LVL_PAGE_SYSOP           7
  448. #define LVL_READ_MSG             8
  449. #define LVL_DISPLAY_USER_STATS   9
  450. #define LVL_UPLOAD               10
  451. #define LVL_VIEW_A_FILE          11
  452. #define LVL_EDIT_USER_INFO       12
  453. #define LVL_REMOTE_SHELL         13
  454. #define LVL_ZIPPY_TEXT_SEARCH    14
  455. #define LVL_OVERRIDE_CHAT        15
  456. #define LVL_EDIT_USER_NAME       16
  457. #define LVL_EDIT_USER_LOCATION   17
  458. #define LVL_EDIT_PHONE_NUMBER    18
  459. #define LVL_EDIT_PASSWORD        19
  460. #define LVL_SENTBY_FILES         20
  461. #define LVL_DEFAULT_CHAT_ON      21
  462. #define LVL_CLEAR_SCREEN_MSG     22
  463. #define LVL_CAPITOLS_in_FILE     23
  464. #define LVL_CHAT_COLOR_SYSOP     24
  465. #define LVL_CHAT_COLOR_USER      25
  466. #define LVL_VARYING_LINK_RATE    26
  467. #define LVL_KEEP_UPLOAD_CREDIT   27
  468. #define LVL_ALLOW_FREE_RESUMING  28
  469. #define LVL_DO_CALLERSLOG        29
  470. #define LVL_DO_UD_LOG            30
  471. #define LVL_OVERRIDE_TIMES       41
  472. #define LVL_BULLETINS            42
  473. #define LVL_SYSOP_READ           43
  474. #define LVL_NODE_NUMBER          44
  475. #define LVL_SCREEN_TO_FRONT      45
  476. #define LVL_ZOO                  46
  477. #define LVL_PKAX                 47
  478. #define LVL_LHARC                48
  479. #define LVL_WARP                 49
  480. #define LVL_ZIP                  50
  481.  
  482. #define DEBUG_BEGIN             0
  483. #define DEBUG_DROPDTR           1
  484. #define DEBUG_AWAITING_CONNECT  2
  485. #define DEBUG_RESETING_NODE     3
  486. #define DEBUG_RESETING_MODEM    4
  487. #define DEBUG_MODEM_RESET       5
  488. #define DEBUG_CHECKING_SHUTDOWN 6
  489. #define DEBUG_CONNECT_TIMEOUT   7
  490. #define DEBUG_BAD_CONNECT       8
  491. #define DEBUG_SER_ROUTINES      9
  492. #define DEBUG_CON_ROUTINES     10
  493. #define DEBUG_CONNECT          11
  494. #define DEBUG_SYSOP_LOGON      12
  495. #define DEBUG_REMOTE_LOGON     13
  496. #define DEBUG_SUSPEND_LOGON    14
  497. #define DEBUG_LOCAL_LOGON      15
  498. #define DEBUG_LOGOFF_SCRIPT    16
  499.  
  500. #define CONSOLE_PORT 1
  501. #define SERIAL_PORT 2
  502.